﻿<%@ Page Language="C#" MasterPageFile="~/Templates/Admin.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Admin_MarketPlace_Default" Title="Untitled Page" %>

<%@ Register Assembly="Jalal.Library" Namespace="Jalal.Library.Web.Control" TagPrefix="ucc" %>
<%@ Register Src="~/Controls/wucDatePicker.ascx" TagName="DatePicker" TagPrefix="wuc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../../Javascripts/Common/DatePicker.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="MiddleAreaContent" ContentPlaceHolderID="MiddleArea" runat="Server">
    <table width="100%" cellpadding="0" cellspacing="0">
        <tr>
            <td style="height: 20px;">
                &nbsp;
            </td>
        </tr>
        <%--<tr>
            <td align="left" valign="top">
                <a href="add-marketplace.aspx">Add New</a>
            </td>
        </tr>--%>
        <tr>
            <td align="center" valign="top">
                <ucc:ResponseMessage ID="uccResponse" runat="server"></ucc:ResponseMessage>
            </td>
        </tr>
        <tr>
            <td>
                <table class="search-box">
                    <tr>
                        <td>
                            <table cellpadding="5" cellspacing="5">
                                <tr align="left">
                                    <td>
                                        Username
                                        <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
                                    </td>
                                    <td>
                                        Active
                                        <asp:DropDownList ID="ddlActive" runat="server">
                                            <asp:ListItem Text="All" Value="-1"></asp:ListItem>
                                            <asp:ListItem Text="Active" Value="True"></asp:ListItem>
                                            <asp:ListItem Text="Inactive" Value="False"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Date From
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtFromDate" runat="server" Width="150px" onkeypress="return false;"
                                            BackColor="#E0E0E0"></asp:TextBox>
                                        <a href="#" onclick="displayDatePicker('<%= txtFromDate.ClientID.Replace("_", "$")%>'); return false;">
                                            <img alt="" style="border: 0px none;" src='<%= Page.ResolveUrl("~/App_Themes/AdminDefault/image/Calendar.png") %>'
                                                id="imgFromDate" />
                                        </a><a href="" onclick="javascript:document.getElementById('<%=txtFromDate.ClientID  %>').value='';return false; ">
                                            Clear</a>
                                    </td>
                                    <td>
                                        Date To
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtToDate" runat="server" Width="150px" onkeypress="return false;"
                                            BackColor="#E0E0E0"></asp:TextBox>
                                        <a href="#" onclick="displayDatePicker('<%= txtToDate.ClientID.Replace("_", "$")%>'); return false;">
                                            <img alt="" style="border: 0px none;" src='<%= Page.ResolveUrl("~/App_Themes/AdminDefault/image/Calendar.png") %>'
                                                id="img1" />
                                        </a><a href="" onclick="javascript:document.getElementById('<%=txtToDate.ClientID  %>').value='';return false; ">
                                            Clear</a>
                                    </td>
                                </tr>
                                 <tr>
                        <td align="right" colspan="6">
                            <asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="button" 
                                onclick="btnSearch_Click" />
                        </td>
                    </tr>
                            </table>
                        </td>
                    </tr>
                   
                </table>
            </td>
        </tr>
        <tr>
            <td align="center" valign="top">
                <asp:GridView ID="grvMarketPlaceList" runat="server" OnRowCommand="grvMarketPlaceList_RowCommand"
                    SkinID="GridView1" Width="100%">
                    <Columns>
                        <asp:BoundField DataField="ItemID" HeaderText="ID#" />
                        <asp:BoundField DataField="UserID" HeaderText="UserID#" />
                        <asp:BoundField DataField="Title" HeaderText="Title" />
                        <asp:BoundField DataField="Date" HeaderText="Submit Date" />
                        <asp:BoundField DataField="ShowContactInfo" HeaderText="ShowContactInfo" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <a href="<%= BCGC.BLL.Helper.CustomSiteMap.MarketPlaceDetails %>?id=<%#Eval("ItemID") %>">
                                    View/Edit</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="lnbDelete" runat="server" CommandName="cmdDelete" CommandArgument='<%#Eval("ItemID") %>'
                                    Text="Delete" OnClientClick="javascript:return confirm('are you sure, you want to delete?');"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
